<% unless @category -%>
<a href = '#' id='category_menu' onclick ="Element.show('category_option')">
  Subscription Option
</a>

<div id='category_option'  style="display: none;">

<%= link_to_remote "Unsubscribe", :url => subscription_url(@subscription),
:method => :delete, :loading => visual_effect(:blind_up,'category_option')%>

<div id='choose_category'>
  <% form_remote_tag :url => subscription_url(@subscription), :method => :put do%>
  Add to folder
  <%= select :subscription, :category_id, category_choices %>
  <%= submit_tag %>
  <% end %>
</div>

<div id='new_category' >
<% form_remote_tag :url => categories_url do -%>
New Folder Name:
<%= text_field 'category', 'title' %>
<%= hidden_field_tag "subscriptions[#{@subscription.id}]" %>
<%= submit_tag %>
<% end -%>

</div>

<a href='#' onclick="Element.hide('category_option')">Close</a>
</div>
|
<% end -%>

<%= link_to_remote "Mark all as readed", :url => mark_url, :method => :put %>
|
<% if user.display_all -%>

<%= link_to_remote "Show only new", :url =>add_option( {:controller => 'users', :action => 'show_new' })%>
<% else -%>
<%= link_to_remote "Show all",  :url =>add_option( {:controller => 'users', :action => 'show_all'})%>
<% end -%>

